dashstyle attributes of the paint brush (including dash, dashdot, and solid) to determine the straight line style. Similarly, you can easily modify the appearance of a filled area by using a collection of brushes such as solidbrush, hatchbrush, and gradientbrush. For example, you can use a solidbrush to fill a rectangular area with multiple straight lines of different thicknesses. So when can we use paint brushes and paint brushes? As in the precedin
circular, with the string ' O ' identification, the specific view manual) -alpha: Transparency (default is 1.0, opaque, 0 is fully transparent) -width: Edge width (default is 1.0) - Edge_color: Edge Color (default is black) -style: Side style (default to implementation, Optional: Solid|dashed|dotted,dashdot) -with_labels: Whether the node has a label (default is True) -font_size: node label font size (defaults to) -font_color: node label font color (
draw a two-dimensional graph of two vectors, for example
X=1:0.1:2*pi;
Plot (X,sin (x)) can draw an image of the sine function on the 0-2pi.
The plot function can take some parameters to change the attributes (colors, image elements, etc.) of the image being drawn. The following are descriptions of some propertiesb Blue (blue). Point (dot)-Solid (solid line)G Green (green) o Circle (circle): Dotted (dot line)R Red (red) x X-mark (cross)-. Dashdot (do
Biker and Parker
Refer:
"10 basic techniques for GDI + programming"
"Rubber band"
Draw dotted lines on the canvas with a pen
To draw the dotted line and the geometric shape of the dotted line border on the graphics object, the key is all on the pen object.
Pen. dashstyle -- used to set the dotted line style. This property receives a dashstyle enumeration.
Dash
Draw line
Dashdot
Click to draw a line
Dash
: ' Lower right '
5: ' Right '
6: ' Center left '
7: ' Center right '
8: ' Lower center '
9: ' Upper center '
Ten: ' Center '
3. Style of line
(1) Color
The keyword parameter of the plot method color (or c) is used to set the colors of the lines. The desirable values are:
1. Color name or shorthand
B:blue
G:green
R:red
C:cyan
M:magenta
Y:yellow
K:black
W:white
2. #rrggbb
3, (R, G, b) or (R, G, B, a), where R G B A is taken between [0, 1]
4, [0, 1] The string form of the floating-point number, re
) -' Node_color ': specifies the color of the node (the default is red, you can easily identify the color with a string, such as ' R ' is red, ' B ' is green, etc., see the manual) -The shape of the ' Node_shape ': node (the default is a circle, identified by the string ' o ', to see the manual) -' alpha ' : Transparency (default is 1.0, opaque, 0 is fully transparent) -' width ': Width of Edge (default = 1.0) -' edge_color ': The Color of the edge (default is black) -' style ': The sty
Line is the most commonly used in graphs, which have two special properties from and to, which are the starting and ending point coordinates.
If you want to change the line style, the LineStyle (Stroke) attribute can do this:
Single(default),
Thinthin,
Thinthick,
Thickbetweenthin
If you want to change the type of the line, you can use the DashStyle (Stroke) Property:
dashstyle= "Dot"/>
Solid(default): see above
Shortdash:
Shortdot:
Shortdashdot:
border by modifying the LineStyle second parameter-using Lineborder. The following table lists the primary border settings
Border name
Note
Thin
Thin Solid Line
Medium
Thick Solid line
Thick
Thick Solid line
Dashed
Dashed
Dotted
Point line
Dashdot
Dot Dotted Line
In Excel, there are requirements for m
': Specifies the size of the node (default is 300, the unit is unknown, that is, the large point in the picture above)-' Node_color ': Specifies the color of the node (the default is red, you can use a simple string to identify the color, such as ' R ' is red, ' B ' is green, etc., you can view the manual, you must value the dictionary (. VALUES ()) When you assign a value to a "data dictionary", and then assign a value-' node_shape ': The Shape of the node (the default is circular, with the st
name or short name
B: blue
G: green
R: red
C: cyan
M: magenta
Y: yellow
K: black
W: white
2. # rrggbb
3. (r, g, B) or (r, g, B, a) Where r g B a is between [0, 1]
4. The string format of the floating point between [0, 1], indicating the gray value. 0 indicates black, 1 indicates white
(2) style
The keyword parameter linestyle (or ls) of the plot method is used to set the line style. Optional values:
-, Solid
--, Dashed
-., Dashdot
:, Dotted
)')plt.plot(x, y2, label='y = cos(x)')plt.legend()plt.show()
(2) style
The keyword parameter linestyle (or ls) of the plot method is used to set the line style. Optional values:
-, Solid
--, Dashed
-., Dashdot
:, Dotted
'','', None
(3) width
You can set the keyword parameter linewidth (or lw) of the plot method to change the line width. its value is a floating point number.
import numpy as npimport matplotlib.pyplot as pltx = np.linspace(0,
Plot () function: Just specify the Parameter
Plot (x, y) to draw the image, X is the X coordinate, Y is the Y coordinate
Requirement: X and Y are vectors of the same length?
Special usage:
A; X is the vector, Y is the matrix, and the length of the period one-dimensional and X is the same
1 x=0:0.1:8; 2 3 y=sin(x); 4 5 plot(x,y) 6 7 >> x=0:0.1:8; 8 9 >> y1=sin(x);10 11 >> y2=cos(x);12 13 >> z=[y1;y2];14 15 >> plot(x,z);
B: Use parameters to express different colors and States
1 x=0:0.1:2*p
roundrect (just the learning rules of the "polar path, I will not use too many level-1 tags or level-2 tags when you are a "VML cainiao ). Most of the second-level tags are not supported. There is only one exception, such as Textbox content, which can be regarded as a level-1 tag and can be considered as a level-2 tag. HoweverIDThis general attribute is supported by all level 1 and level 2 tags.2: stroke border-special attribute reference table
Attribute name
Default Value
Value
.
LinearGradientBrushmm=newLinearGradientBrush(newPoint(0,10)),
newPoint(0,0),
newPoint(200,200),
Color.FormArgb(255,255,0,0),
Color.FormArgb(255,0,0,255));
3. Pen class
The pen class is used to draw a straight line or curve object. It draws a straight line with a specified width and style through its own properties. You can use the dashstyle attribute to draw a dotted line. The value of the dashstyle attribute is defined by the dashstyle enumeration.
Custom: Set a custom line
= AGSSimpleMarkerSymbolStyleDiamond; myMarkerSymbol.outline.color = [UIColor whiteColor]; myMarkerSymbol.outline.width = 3;The agspicturemarkersymbol is filled with a given image. You can set its size, rotation angle, and offset.Figure 3-3-2-2 main attributes and methods of agspicturemarkersymbolBy default, "the image is pressed on the point", that is, the coordinate corresponds to the pixel center of the image symbol. If you use a pointing icon (such as a dingtalk or bubble ), you need to set
1. Drawing1) colorThe keyword parameter of the plot method color (or c) is used to set the colors of the lines. The desirable values are:1. Color name or shorthandB:blueG:greenR:redC:cyanM:magentaY:yellowK:blackW:white2. #rrggbb3, (R, G, b) or (R, G, B, a), where R G B A is taken between [0, 1]4, [0, 1] The string form of the floating-point number, representing the grayscale value. 0 = black, 1 for White(2) styleThe keyword parameter of the plot method LineStyle (or LS) is used to set the style
Defining a coordinate systemCRect rect;GetClientRect (rect);//actually now I do not quite understand this sentence has any specific meaning! @@!!The coordinate system of the custom Form window and viewport is defined by itselfPdc->setmapmode (Mm_anisotropic);Commonly used patterns are also mm_text (each logical coordinate corresponds to a device coordinate positive x right y downward)Defines the viewport, which is set to x right by the comparison to the window setting, and Y is up pdc->setwindow
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.